Descriptives across the categories (Political_True and _False)

df_political %>% group_by(Category, measurement) %>%
  summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
## # A tibble: 6 x 9
## # Groups:   Category [2]
##   Category       measurement  mean     SD count     se median   min   max
##   <chr>          <fct>       <dbl>  <dbl> <int>  <dbl>  <dbl> <dbl> <dbl>
## 1 Political_Fake Acc_Abs     57.7  13.4     140 1.13    58.8  21.9  85.4 
## 2 Political_Fake Acc          2.96  0.536   140 0.0453   2.90  1.8   4.42
## 3 Political_Fake Fam          2.03  0.305   140 0.0258   2.02  1.29  3.51
## 4 Political_True Acc_Abs     63.1  12.5     152 1.01    64.9  25.7  88.2 
## 5 Political_True Acc          3.79  0.505   152 0.0410   3.82  2.14  4.82
## 6 Political_True Fam          2.42  0.414   152 0.0336   2.33  1.7   3.61
# Basic histogram Absolute Accuracy
df_political %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Percentage", x = "Percentage Values", y = "Count",  subtitle = "For all values collapsed across political leaning and true vs false news") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") 
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic boxplot Absolute Accuracy
df_political %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value)) + geom_boxplot() + theme_apa() + labs(title = "Accuracy Boxplot - Percentage", x = "Percentage Values", y = "Count",  subtitle = "For all values collapsed across political leaning and true vs false news")

# Basic histogram Absolute Accuracy
df_political %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Percentage", x = "Percentage Values", y = "Count", subtitle = "Grouped by true vs false news, collapsed acorss political leaning") + facet_wrap(~Category)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic boxplot Absolute Accuracy
df_political %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value)) + geom_boxplot() + theme_apa() + labs(title = "Accuracy Boxplot - Percentage", x = "Percentage Values", y = "Count",  subtitle = "For all values collapsed across political leaning and true vs false news") + facet_wrap(~Category)

# Basic histogram Relative Accuracy
df_political %>% filter(measurement == "Acc") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Likert means", x = "Likert Values", y = "Count",  subtitle = "For all values collapsed across political leaning and true vs false news \n 1: extremely unlikely; 6 extremely likely") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") 
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Relative Accuracy
df_political %>% filter(measurement == "Acc") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "Collapsed acorss political leaning \n 1: extremely unlikely; 6 extremely likely") + facet_wrap(~Category)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Familiarity 
df_political %>% filter(measurement == "Fam") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Familiarity Histogram - Likert means", x = "Likert Values", y = "Count",  subtitle = "For all values collapsed across political leaning and true vs false news \n 1: not at all; 6 extremely") + geom_vline(aes(xintercept = mean(value)), linetype="dashed")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Familiarity
df_political %>% filter(measurement == "Fam") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Familiarity Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "Collapsed acorss political leaning \n 1: not at all; 6 extremely") + facet_wrap(~Category)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Descriptives across the Political_True only

df_political_true %>% group_by(political_leaning, measurement) %>%
  summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
## # A tibble: 6 x 9
## # Groups:   political_leaning [2]
##   political_leani… measurement  mean     SD count     se median   min   max
##   <chr>            <fct>       <dbl>  <dbl> <int>  <dbl>  <dbl> <dbl> <dbl>
## 1 Democrat         Acc_Abs     66.2  11.6      76 1.33    68.5  35.6  88.2 
## 2 Democrat         Acc          3.94  0.459    76 0.0526   3.98  2.71  4.82
## 3 Democrat         Fam          2.45  0.458    76 0.0526   2.3   1.77  3.61
## 4 Republican       Acc_Abs     60.0  12.6      76 1.45    58.2  25.7  87.8 
## 5 Republican       Acc          3.65  0.512    76 0.0587   3.61  2.14  4.8 
## 6 Republican       Fam          2.39  0.364    76 0.0418   2.34  1.7   3.44
# Basic histogram Absolute Accuracy
df_political_true %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Percentage", x = "Percentage Values", y = "Count", subtitle = "For Political_True only, collapsed across political leaning") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") 
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Absolute Accuracy
df_political_true %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Percentage", x = "Percentage Values", y = "Count", subtitle = "For Political_True only") + facet_wrap(~political_leaning)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Relative Accuracy
df_political_true %>% filter(measurement == "Acc") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For Political_True only, collapsed across political leaning \n 1: extremely unlikely; 6 extremely likely") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") 
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Relative Accuracy
df_political_true %>% filter(measurement == "Acc") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For Political_True only \n 1: extremely unlikely; 6 extremely likely") + facet_wrap(~political_leaning)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Familiarity 
df_political_true %>% filter(measurement == "Fam") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Familiarity Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For Political_True only, collapsed across political leaning \n 1: not at all; 6 extremely") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") 
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Familiarity
df_political_true %>% filter(measurement == "Fam") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Familiarity Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For Political_True only \n 1: not at all; 6 extremely") + facet_wrap(~political_leaning)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Descriptives across the Political_False only

df_political_false %>% group_by(political_leaning, measurement) %>%
  summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
## # A tibble: 6 x 9
## # Groups:   political_leaning [2]
##   political_leani… measurement  mean     SD count     se median   min   max
##   <chr>            <fct>       <dbl>  <dbl> <int>  <dbl>  <dbl> <dbl> <dbl>
## 1 Democrat         Acc_Abs     58.8  12.7      70 1.52    59.5  26.7  85.4 
## 2 Democrat         Acc          2.94  0.515    70 0.0615   2.92  1.8   4.4 
## 3 Democrat         Fam          2.05  0.322    70 0.0385   2.02  1.43  3.51
## 4 Republican       Acc_Abs     56.7  14.1      70 1.68    58.7  21.9  78.9 
## 5 Republican       Acc          2.98  0.560    70 0.0670   2.90  1.94  4.42
## 6 Republican       Fam          2.01  0.289    70 0.0345   1.96  1.29  2.65
# Basic histogram Absolute Accuracy
df_political_false %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Percentage", x = "Percentage Values", y = "Count", subtitle = "For Political_False only, collapsed across political leaning") + geom_vline(aes(xintercept = mean(value)), linetype="dashed")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Absolute Accuracy
df_political_false %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Percentage", x = "Percentage Values", y = "Count", subtitle = "For Political_False only") + facet_wrap(~political_leaning)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Relative Accuracy
df_political_false %>% filter(measurement == "Acc") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For Political_False only, collapsed across political leaning \n 1: extremely unlikely; 6 extremely likely") + geom_vline(aes(xintercept = mean(value)), linetype="dashed")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Relative Accuracy
df_political_false %>% filter(measurement == "Acc") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For Political_False only \n 1: extremely unlikely; 6 extremely likely") + facet_wrap(~political_leaning)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Familiarity 
df_political_false %>% filter(measurement == "Fam") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Familiarity Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For Political_False only, collapsed across political leaning \n 1: not at all; 6 extremely") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") 
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Familiarity
df_political_false %>% filter(measurement == "Fam") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Familiarity Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For Political_False only \n 1: not at all; 6 extremely") + facet_wrap(~political_leaning)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Clean Descriptives across the categories (Political_True and _False)

c_df_political %>% group_by(Category, measurement) %>%
  summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
## # A tibble: 6 x 9
## # Groups:   Category [2]
##   Category       measurement  mean     SD count     se median   min   max
##   <chr>          <fct>       <dbl>  <dbl> <int>  <dbl>  <dbl> <dbl> <dbl>
## 1 Political_Fake Acc_Abs     59.5  10.8     118 0.991   59.4  38.2  78.3 
## 2 Political_Fake Acc          2.90  0.440   118 0.0405   2.88  1.94  3.88
## 3 Political_Fake Fam          2.02  0.271   118 0.0249   2.02  1.29  2.75
## 4 Political_True Acc_Abs     63.9  10.2     128 0.904   65.2  42.9  82.9 
## 5 Political_True Acc          3.83  0.427   128 0.0377   3.84  2.88  4.82
## 6 Political_True Fam          2.45  0.394   128 0.0348   2.35  1.7   3.57
# Basic histogram Absolute Accuracy
c_df_political %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Percentage", x = "Percentage Values", y = "Count",  subtitle = "For all values collapsed across political leaning and true vs false news") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") 
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic boxplot Absolute Accuracy
c_df_political %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value)) + geom_boxplot() + theme_apa() + labs(title = "Accuracy Boxplot - Percentage", x = "Percentage Values", y = "Count",  subtitle = "For all values collapsed across political leaning and true vs false news")

# Basic histogram Absolute Accuracy
c_df_political %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Percentage", x = "Percentage Values", y = "Count", subtitle = "Grouped by true vs false news, collapsed acorss political leaning") + facet_wrap(~Category)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic boxplot Absolute Accuracy
c_df_political %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value)) + geom_boxplot() + theme_apa() + labs(title = "Accuracy Boxplot - Percentage", x = "Percentage Values", y = "Count",  subtitle = "For all values collapsed across political leaning and true vs false news") + facet_wrap(~Category)

# Basic histogram Relative Accuracy
c_df_political %>% filter(measurement == "Acc") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Likert means", x = "Likert Values", y = "Count",  subtitle = "For all values collapsed across political leaning and true vs false news \n 1: extremely unlikely; 6 extremely likely") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") 
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Relative Accuracy
c_df_political %>% filter(measurement == "Acc") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "Collapsed acorss political leaning \n 1: extremely unlikely; 6 extremely likely") + facet_wrap(~Category)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Familiarity 
c_df_political %>% filter(measurement == "Fam") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Familiarity Histogram - Likert means", x = "Likert Values", y = "Count",  subtitle = "For all values collapsed across political leaning and true vs false news \n 1: not at all; 6 extremely") + geom_vline(aes(xintercept = mean(value)), linetype="dashed")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Familiarity
c_df_political %>% filter(measurement == "Fam") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Familiarity Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "Collapsed acorss political leaning \n 1: not at all; 6 extremely") + facet_wrap(~Category)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Clean Descriptives across the Political_True only

c_df_political_true %>% group_by(political_leaning, measurement) %>%
  summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
## # A tibble: 6 x 9
## # Groups:   political_leaning [2]
##   political_leani… measurement  mean     SD count     se median   min   max
##   <chr>            <fct>       <dbl>  <dbl> <int>  <dbl>  <dbl> <dbl> <dbl>
## 1 Democrat         Acc_Abs     66.5  10.0      64 1.26    68.8  44.6  81.7 
## 2 Democrat         Acc          3.96  0.402    64 0.0502   3.99  3.06  4.82
## 3 Democrat         Fam          2.47  0.437    64 0.0547   2.32  1.8   3.57
## 4 Republican       Acc_Abs     61.3   9.79     64 1.22    58.6  42.9  82.9 
## 5 Republican       Acc          3.70  0.414    64 0.0518   3.62  2.88  4.73
## 6 Republican       Fam          2.42  0.347    64 0.0434   2.37  1.7   3.44
# Basic histogram Absolute Accuracy
c_df_political_true %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Percentage", x = "Percentage Values", y = "Count", subtitle = "For Political_True only, collapsed across political leaning") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") 
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Absolute Accuracy
c_df_political_true %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Percentage", x = "Percentage Values", y = "Count", subtitle = "For Political_True only") + facet_wrap(~political_leaning)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Relative Accuracy
c_df_political_true %>% filter(measurement == "Acc") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For Political_True only, collapsed across political leaning \n 1: extremely unlikely; 6 extremely likely") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") 
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Relative Accuracy
c_df_political_true %>% filter(measurement == "Acc") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For Political_True only \n 1: extremely unlikely; 6 extremely likely") + facet_wrap(~political_leaning)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Familiarity 
c_df_political_true %>% filter(measurement == "Fam") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Familiarity Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For Political_True only, collapsed across political leaning \n 1: not at all; 6 extremely") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") 
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Familiarity
c_df_political_true %>% filter(measurement == "Fam") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Familiarity Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For Political_True only \n 1: not at all; 6 extremely") + facet_wrap(~political_leaning)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Clean Descriptives across the Political_False only

c_df_political_false %>% group_by(political_leaning, measurement) %>%
  summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
## # A tibble: 6 x 9
## # Groups:   political_leaning [2]
##   political_leani… measurement  mean     SD count     se median   min   max
##   <chr>            <fct>       <dbl>  <dbl> <int>  <dbl>  <dbl> <dbl> <dbl>
## 1 Democrat         Acc_Abs     59.8  10.7      59 1.39    60.5  39.6  78.3 
## 2 Democrat         Acc          2.91  0.439    59 0.0571   2.91  2.15  3.75
## 3 Democrat         Fam          2.03  0.271    59 0.0352   2.02  1.43  2.75
## 4 Republican       Acc_Abs     59.2  10.9      59 1.42    59.4  38.2  78.1 
## 5 Republican       Acc          2.89  0.445    59 0.0579   2.86  1.94  3.88
## 6 Republican       Fam          2.00  0.272    59 0.0354   1.93  1.29  2.59
# Basic histogram Absolute Accuracy
c_df_political_false %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Percentage", x = "Percentage Values", y = "Count", subtitle = "For Political_False only, collapsed across political leaning") + geom_vline(aes(xintercept = mean(value)), linetype="dashed")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Absolute Accuracy
c_df_political_false %>% filter(measurement == "Acc_Abs") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Percentage", x = "Percentage Values", y = "Count", subtitle = "For Political_False only") + facet_wrap(~political_leaning)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Relative Accuracy
c_df_political_false %>% filter(measurement == "Acc") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For Political_False only, collapsed across political leaning \n 1: extremely unlikely; 6 extremely likely") + geom_vline(aes(xintercept = mean(value)), linetype="dashed")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Relative Accuracy
c_df_political_false %>% filter(measurement == "Acc") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Accuracy Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For Political_False only \n 1: extremely unlikely; 6 extremely likely") + facet_wrap(~political_leaning)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Familiarity 
c_df_political_false %>% filter(measurement == "Fam") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Familiarity Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For Political_False only, collapsed across political leaning \n 1: not at all; 6 extremely") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") 
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram Familiarity
c_df_political_false %>% filter(measurement == "Fam") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Familiarity Histogram - Likert means", x = "Likert Values", y = "Count", subtitle = "For Political_False only \n 1: not at all; 6 extremely") + facet_wrap(~political_leaning)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Item selection (politically true only)

all items, no familiarity thershold (political_true only)

#all familiarity
c_df_political_true %>% filter(measurement == "Fam") %>%
  ggplot() + geom_bar(aes(x = `Image Name`, y = value, fill = Par_Combined), stat = 'identity', position = 'dodge') + theme_apa(legend.use.title = TRUE) + theme(axis.text.x = element_text(angle = 45, hjust = 1, size = 4)) + labs(title = "All items, all familiarity", x = "Image Name", y = "Familiarity", fill = "Item Pol. Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

accuracy_all_fam <- c_df_political_true %>% filter(measurement == "Acc_Abs") %>% group_by(political_leaning, Par_Combined) %>% summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
accuracy_all_fam
## # A tibble: 4 x 9
## # Groups:   political_leaning [2]
##   political_leaning Par_Combined  mean    SD count    se median   min   max
##   <chr>             <fct>        <dbl> <dbl> <int> <dbl>  <dbl> <dbl> <dbl>
## 1 Democrat          Dem Favoured  68.7  8.84    45  1.32   70.2  45.1  81.7
## 2 Democrat          Rep Favoured  61.3 11.0     19  2.53   63.5  44.6  77.6
## 3 Republican        Dem Favoured  58.8  8.92    45  1.33   56.8  42.9  78.0
## 4 Republican        Rep Favoured  67.3  9.35    19  2.14   66.0  51.4  82.9
#making table
accuracy_all_fam_table <- accuracy_all_fam[1:2,-1]

accuracy_all_fam %>%
  ggplot(aes(x = Par_Combined, y = mean, fill = as.factor(political_leaning))) + 
  geom_bar(stat = 'identity', position = 'dodge') + geom_errorbar(aes(ymin = mean-se, ymax =mean + se), width = .2, position = position_dodge(.9)) + theme_apa(legend.use.title = TRUE) + labs(title ="Accuracy across Dem and Rep favoured items", x = "Item Political Leaning", y = "Percent Accuracy", fill = "Pps Political Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

all items, familiarity thershold < 3 (political_true only)

# limited to three
c_df_political_true %>% filter(measurement == "Fam", value < 3) %>%
  ggplot() + geom_bar(aes(x = `Image Name`, y = value, fill = Par_Combined), stat = 'identity', position = 'dodge') + theme_apa(legend.use.title = TRUE) + theme(axis.text.x = element_text(angle = 45, hjust = 1, size = 4)) + labs(title = "All items, familiarity < 3", x = "Image Name", y = "Familiarity", fill = "Item Pol. Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

# need to find item numbers of those with Fam < 3 (across both dem and rep averaged)
# collapse across dem and rep - find average fam score, then exclude those that you don't need - make index from that.
accuracy_all_three_index <- c_df_political_true %>% group_by(`Item #`, `Image Name`, Par_Combined) %>% filter(measurement == "Fam") %>% summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))

accuracy_all_three_index <- accuracy_all_three_index %>% filter(mean < 3)
accuracy_all_three_index <- accuracy_all_three_index[[1]]
# accuracy_all_three_index
# length(accuracy_all_three_index)

#given the index, now subset based on the index numbers.
accuracy_all_three <- c_df_political_true %>% filter(measurement == "Acc_Abs", `Item #` %in% accuracy_all_three_index) %>% group_by(political_leaning, Par_Combined) %>%
  summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
accuracy_all_three
## # A tibble: 4 x 9
## # Groups:   political_leaning [2]
##   political_leaning Par_Combined  mean    SD count    se median   min   max
##   <chr>             <fct>        <dbl> <dbl> <int> <dbl>  <dbl> <dbl> <dbl>
## 1 Democrat          Dem Favoured  68.5  8.72    44  1.31   69.9  45.1  81.7
## 2 Democrat          Rep Favoured  60.6 11.5     17  2.78   61.0  44.6  77.6
## 3 Republican        Dem Favoured  58.8  9.02    44  1.36   56.8  42.9  78.0
## 4 Republican        Rep Favoured  65.5  8.12    17  1.97   65.9  51.4  79.1
#making table
accuracy_all_three_table <- accuracy_all_three[1:2,-1]

accuracy_all_three %>%
  ggplot(aes(x = Par_Combined, y = mean, fill = as.factor(political_leaning))) + 
  geom_bar(stat = 'identity', position = 'dodge') + geom_errorbar(aes(ymin = mean-se, ymax =mean + se), width = .2, position = position_dodge(.9)) + theme_apa(legend.use.title = TRUE) + labs(title ="Accuracy across Dem and Rep favoured items", x = "Item Political Leaning", y = "Percent Accuracy", fill = "Pps Political Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

all items, familiarity thershold < 2.5 (political_true only)

# limited to 2.5
c_df_political_true %>% filter(measurement == "Fam", value < 2.5) %>%
  ggplot() + geom_bar(aes(x = `Image Name`, y = value, fill = Par_Combined), stat = 'identity', position = 'dodge') + theme_apa(legend.use.title = TRUE) + theme(axis.text.x = element_text(angle = 45, hjust = 1, size = 5)) + labs(title = "All items, familiarity < 2.5", x = "Image Name", y = "Familiarity", fill = "Item Pol. Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

# need to find item numbers of those with Fam < 2.5 (across both dem and rep averaged)
# collapse across dem and rep - find average fam score, then exclude those that you don't need - make index from that.
accuracy_all_two.five <- c_df_political_true %>% group_by(`Item #`, `Image Name`, Par_Combined) %>% filter(measurement == "Fam") %>% summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))

accuracy_all_two.five <- accuracy_all_two.five %>% filter(mean < 2.5)
accuracy_all_two.five <- accuracy_all_two.five[[1]]
# accuracy_all_two.five
# length(accuracy_all_two.five)

#given the index, now subset based on the index numbers.
accuracy_all_two.five <- c_df_political_true %>% filter(measurement == "Acc_Abs", `Item #` %in% accuracy_all_two.five) %>% group_by(political_leaning, Par_Combined) %>%
  summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
accuracy_all_two.five
## # A tibble: 4 x 9
## # Groups:   political_leaning [2]
##   political_leaning Par_Combined  mean    SD count    se median   min   max
##   <chr>             <fct>        <dbl> <dbl> <int> <dbl>  <dbl> <dbl> <dbl>
## 1 Democrat          Dem Favoured  66.4  8.89    30  1.62   68.8  45.1  81.7
## 2 Democrat          Rep Favoured  56.9 11.1     11  3.34   58.7  44.6  77.6
## 3 Republican        Dem Favoured  56.8  7.75    30  1.42   56.0  42.9  78.0
## 4 Republican        Rep Favoured  63.1  8.15    11  2.46   65.8  51.4  76.3
#making table
accuracy_all_two.five_table <- accuracy_all_two.five[1:2,-1]

accuracy_all_two.five %>%
  ggplot(aes(x = Par_Combined, y = mean, fill = as.factor(political_leaning))) + 
  geom_bar(stat = 'identity', position = 'dodge') + geom_errorbar(aes(ymin = mean-se, ymax =mean + se), width = .2, position = position_dodge(.9)) + theme_apa(legend.use.title = TRUE) + labs(title ="Accuracy across Dem and Rep favoured items", x = "Item Political Leaning", y = "Percent Accuracy", fill = "Pps Political Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

all items, familiarity thershold < 2.4 (political_true only)

# limited to 2.4
c_df_political_true %>% filter(measurement == "Fam" , value < 2.4) %>%
  ggplot() + geom_bar(aes(x = `Image Name`, y = value, fill = Par_Combined), stat = 'identity', position = 'dodge') + theme_apa(legend.use.title = TRUE) + theme(axis.text.x = element_text(angle = 45, hjust = 1, size = 5)) + labs(title = "All items, familiarity < 2.4", x = "Image Name", y = "Familiarity", fill = "Item Pol. Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

# need to find item numbers of those with Fam < 2.4 (across both dem and rep averaged)
# collapse across dem and rep - find average fam score, then exclude those that you don't need - make index from that.
accuracy_all_two.four <- c_df_political_true %>% group_by(`Item #`, `Image Name`, Par_Combined) %>% filter(measurement == "Fam") %>% summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))

accuracy_all_two.four <- accuracy_all_two.four %>% filter(mean < 2.4)
accuracy_all_two.four <- accuracy_all_two.four[[1]]
# accuracy_all_two.four
# length(accuracy_all_two.four)

#given the index, now subset based on the index numbers.
accuracy_all_two.four <- c_df_political_true %>% filter(measurement == "Acc_Abs", `Item #` %in% accuracy_all_two.four) %>% group_by(political_leaning, Par_Combined) %>%
  summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
accuracy_all_two.four
## # A tibble: 4 x 9
## # Groups:   political_leaning [2]
##   political_leaning Par_Combined  mean    SD count    se median   min   max
##   <chr>             <fct>        <dbl> <dbl> <int> <dbl>  <dbl> <dbl> <dbl>
## 1 Democrat          Dem Favoured  64.2  8.33    24  1.70   66.7  45.1  78.6
## 2 Democrat          Rep Favoured  55.3  9.37     8  3.31   53.3  46.2  69.8
## 3 Republican        Dem Favoured  56.4  8.24    24  1.68   55.7  42.9  78.0
## 4 Republican        Rep Favoured  62.2  8.90     8  3.15   65.3  51.4  76.3
#making table
accuracy_all_two.four_table <- accuracy_all_two.four[1:2,-1]

accuracy_all_two.four %>%
  ggplot(aes(x = Par_Combined, y = mean, fill = as.factor(political_leaning))) + 
  geom_bar(stat = 'identity', position = 'dodge') + geom_errorbar(aes(ymin = mean-se, ymax =mean + se), width = .2, position = position_dodge(.9)) + theme_apa(legend.use.title = TRUE) + labs(title ="Accuracy across Dem and Rep favoured items", x = "Item Political Leaning", y = "Percent Accuracy", fill = "Pps Political Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

all items, familiarity thershold < 2.3 (political_true only)

# limited to 2.3
c_df_political_true %>% filter(measurement == "Fam", value < 2.3) %>%
  ggplot() + geom_bar(aes(x = `Image Name`, y = value, fill = Par_Combined), stat = 'identity', position = 'dodge') + theme_apa(legend.use.title = TRUE) + theme(axis.text.x = element_text(angle = 45, hjust = 1, size = 6)) + labs(title = "All items, familiarity < 2.3", x = "Image Name", y = "Familiarity", fill = "Item Pol. Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

# need to find item numbers of those with Fam < 2.3 (across both dem and rep averaged)
# collapse across dem and rep - find average fam score, then exclude those that you don't need - make index from that.
accuracy_all_two.three <- c_df_political_true %>% group_by(`Item #`, `Image Name`, Par_Combined) %>% filter(measurement == "Fam") %>% summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))

accuracy_all_two.three <- accuracy_all_two.three %>% filter(mean < 2.3)
accuracy_all_two.three <- accuracy_all_two.three[[1]]
# accuracy_all_two.three
# length(accuracy_all_two.three)

#given the index, now subset based on the index numbers.
accuracy_all_two.three <- c_df_political_true %>% filter(measurement == "Acc_Abs", `Item #` %in% accuracy_all_two.three) %>% group_by(political_leaning, Par_Combined) %>%
  summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
accuracy_all_two.three
## # A tibble: 4 x 9
## # Groups:   political_leaning [2]
##   political_leaning Par_Combined  mean    SD count    se median   min   max
##   <chr>             <fct>        <dbl> <dbl> <int> <dbl>  <dbl> <dbl> <dbl>
## 1 Democrat          Dem Favoured  65.0  8.51    20  1.90   68.2  45.1  78.6
## 2 Democrat          Rep Favoured  55.7 11.2      5  5.03   48    46.9  69.8
## 3 Republican        Dem Favoured  55.8  8.39    20  1.88   55.3  42.9  78.0
## 4 Republican        Rep Favoured  62.1 10.4      5  4.66   64.9  51.4  76.3
#making table
accuracy_all_two.three_table <- accuracy_all_two.three[1:2,-1]

accuracy_all_two.three %>%
  ggplot(aes(x = Par_Combined, y = mean, fill = as.factor(political_leaning))) + 
  geom_bar(stat = 'identity', position = 'dodge') + geom_errorbar(aes(ymin = mean-se, ymax =mean + se), width = .2, position = position_dodge(.9)) + theme_apa(legend.use.title = TRUE) + labs(title ="Accuracy across Dem and Rep favoured items", x = "Item Political Leaning", y = "Percent Accuracy", fill = "Pps Political Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

all items, familiarity thershold < 2.2 (political_true only)

# limited to 2.2
c_df_political_true %>% filter(measurement == "Fam", value < 2.2) %>%
  ggplot() + geom_bar(aes(x = `Image Name`, y = value, fill = Par_Combined), stat = 'identity', position = 'dodge') + theme_apa(legend.use.title = TRUE) + theme(axis.text.x = element_text(angle = 45, hjust = 1, size = 6)) + labs(title = "All items, familiarity < 2.2", x = "Image Name", y = "Familiarity", fill = "Item Pol. Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

# need to find item numbers of those with Fam < 2.2 (across both dem and rep averaged)
# collapse across dem and rep - find average fam score, then exclude those that you don't need - make index from that.
accuracy_all_two.two <- c_df_political_true %>% group_by(`Item #`, `Image Name`, Par_Combined) %>% filter(measurement == "Fam") %>% summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))

accuracy_all_two.two <- accuracy_all_two.two %>% filter(mean < 2.2)
accuracy_all_two.two <- accuracy_all_two.two[[1]]
# accuracy_all_two.two
# length(accuracy_all_two.two)

#given the index, now subset based on the index numbers.
accuracy_all_two.two <- c_df_political_true %>% filter(measurement == "Acc_Abs", `Item #` %in% accuracy_all_two.two) %>% group_by(political_leaning, Par_Combined) %>%
  summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
accuracy_all_two.two
## # A tibble: 4 x 9
## # Groups:   political_leaning [2]
##   political_leaning Par_Combined  mean    SD count    se median   min   max
##   <chr>             <fct>        <dbl> <dbl> <int> <dbl>  <dbl> <dbl> <dbl>
## 1 Democrat          Dem Favoured  65.2 10.2     12  2.93   69.5  45.1  78.6
## 2 Democrat          Rep Favoured  57.7 11.9      4  5.97   57.1  46.9  69.8
## 3 Republican        Dem Favoured  53.1  5.55    12  1.60   53.8  42.9  63.0
## 4 Republican        Rep Favoured  64.6 10.2      4  5.10   65.3  51.4  76.3
#making table
accuracy_all_two.two_table <- accuracy_all_two.two[1:2,-1]

accuracy_all_two.two %>%
  ggplot(aes(x = Par_Combined, y = mean, fill = as.factor(political_leaning))) + 
  geom_bar(stat = 'identity', position = 'dodge') + geom_errorbar(aes(ymin = mean-se, ymax =mean + se), width = .2, position = position_dodge(.9)) + theme_apa(legend.use.title = TRUE) + labs(title ="Accuracy across Dem and Rep favoured items", x = "Item Political Leaning", y = "Percent Accuracy", fill = "Pps Political Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

Item selection (politically false only)

all items, no familiarity thershold (political_false only)

#all familiarity
c_df_political_false %>% filter(measurement == "Fam") %>%
  ggplot() + geom_bar(aes(x = `Image Name`, y = value, fill = Par_Combined), stat = 'identity', position = 'dodge') + theme_apa(legend.use.title = TRUE) + theme(axis.text.x = element_text(angle = 45, hjust = 1, size = 4)) + labs(title = "All items, all familiarity", x = "Image Name", y = "Familiarity", fill = "Item Pol. Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

accuracy_all_fam <- c_df_political_false %>% filter(measurement == "Acc_Abs") %>% group_by(political_leaning, Par_Combined) %>% summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
accuracy_all_fam
## # A tibble: 4 x 9
## # Groups:   political_leaning [2]
##   political_leaning Par_Combined  mean    SD count    se median   min   max
##   <chr>             <fct>        <dbl> <dbl> <int> <dbl>  <dbl> <dbl> <dbl>
## 1 Democrat          Dem Favoured  55.4  9.94    30  1.81   56.1  39.6  76.1
## 2 Democrat          Rep Favoured  64.2  9.71    29  1.80   66.0  46.5  78.3
## 3 Republican        Dem Favoured  63.2  9.89    30  1.81   63.2  45.3  78.1
## 4 Republican        Rep Favoured  55.0 10.5     29  1.95   56.8  38.2  73.5
accuracy_all_fam %>%
  ggplot(aes(x = Par_Combined, y = mean, fill = as.factor(political_leaning))) + 
  geom_bar(stat = 'identity', position = 'dodge') + geom_errorbar(aes(ymin = mean-se, ymax =mean + se), width = .2, position = position_dodge(.9)) + theme_apa(legend.use.title = TRUE) + labs(title ="Accuracy across Dem and Rep favoured items", x = "Item Political Leaning", y = "Percent Accuracy", fill = "Pps Political Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

all items, familiarity thershold < 3 (political_false only)

# limited to three
c_df_political_false %>% filter(measurement == "Fam", value < 3) %>%
  ggplot() + geom_bar(aes(x = `Image Name`, y = value, fill = Par_Combined), stat = 'identity', position = 'dodge') + theme_apa(legend.use.title = TRUE) + theme(axis.text.x = element_text(angle = 45, hjust = 1, size = 4)) + labs(title = "All items, familiarity < 3", x = "Image Name", y = "Familiarity", fill = "Item Pol. Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

# need to find item numbers of those with Fam < 3 (across both dem and rep averaged)
# collapse across dem and rep - find average fam score, then exclude those that you don't need - make index from that.
accuracy_all_three_index <- c_df_political_false %>% group_by(`Item #`, `Image Name`, Par_Combined) %>% filter(measurement == "Fam") %>% summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))

accuracy_all_three_index <- accuracy_all_three_index %>% filter(mean < 3)
accuracy_all_three_index <- accuracy_all_three_index[[1]]
# accuracy_all_three_index
# length(accuracy_all_three_index)

#given the index, now subset based on the index numbers.
accuracy_all_three <- c_df_political_false %>% filter(measurement == "Acc_Abs", `Item #` %in% accuracy_all_three_index) %>% group_by(political_leaning, Par_Combined) %>%
  summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
accuracy_all_three
## # A tibble: 4 x 9
## # Groups:   political_leaning [2]
##   political_leaning Par_Combined  mean    SD count    se median   min   max
##   <chr>             <fct>        <dbl> <dbl> <int> <dbl>  <dbl> <dbl> <dbl>
## 1 Democrat          Dem Favoured  55.4  9.94    30  1.81   56.1  39.6  76.1
## 2 Democrat          Rep Favoured  64.2  9.71    29  1.80   66.0  46.5  78.3
## 3 Republican        Dem Favoured  63.2  9.89    30  1.81   63.2  45.3  78.1
## 4 Republican        Rep Favoured  55.0 10.5     29  1.95   56.8  38.2  73.5
#making table
accuracy_all_three_table <- rbind(accuracy_all_three_table, accuracy_all_three[1:2,-1])
accuracy_all_three_table$true_false <- c("Political_True", "Political_True", "Political_False", "Political_False")

accuracy_all_three %>%
  ggplot(aes(x = Par_Combined, y = mean, fill = as.factor(political_leaning))) + 
  geom_bar(stat = 'identity', position = 'dodge') + geom_errorbar(aes(ymin = mean-se, ymax =mean + se), width = .2, position = position_dodge(.9)) + theme_apa(legend.use.title = TRUE) + labs(title ="Accuracy across Dem and Rep favoured items", x = "Item Political Leaning", y = "Percent Accuracy", fill = "Pps Political Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

all items, familiarity thershold < 2.5 (political_false only)

# limited to 2.5
c_df_political_false %>% filter(measurement == "Fam", value < 2.5) %>%
  ggplot() + geom_bar(aes(x = `Image Name`, y = value, fill = Par_Combined), stat = 'identity', position = 'dodge') + theme_apa(legend.use.title = TRUE) + theme(axis.text.x = element_text(angle = 45, hjust = 1, size = 5)) + labs(title = "All items, familiarity < 2.5", x = "Image Name", y = "Familiarity", fill = "Item Pol. Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

# need to find item numbers of those with Fam < 2.5 (across both dem and rep averaged)
# collapse across dem and rep - find average fam score, then exclude those that you don't need - make index from that.
accuracy_all_two.five <- c_df_political_false %>% group_by(`Item #`, `Image Name`, Par_Combined) %>% filter(measurement == "Fam") %>% summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))

accuracy_all_two.five <- accuracy_all_two.five %>% filter(mean < 2.5)
accuracy_all_two.five <- accuracy_all_two.five[[1]]
# accuracy_all_two.five
# length(accuracy_all_two.five)

#given the index, now subset based on the index numbers.
accuracy_all_two.five <- c_df_political_false %>% filter(measurement == "Acc_Abs", `Item #` %in% accuracy_all_two.five) %>% group_by(political_leaning, Par_Combined) %>%
  summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
accuracy_all_two.five
## # A tibble: 4 x 9
## # Groups:   political_leaning [2]
##   political_leaning Par_Combined  mean    SD count    se median   min   max
##   <chr>             <fct>        <dbl> <dbl> <int> <dbl>  <dbl> <dbl> <dbl>
## 1 Democrat          Dem Favoured  55.4  9.94    30  1.81   56.1  39.6  76.1
## 2 Democrat          Rep Favoured  64.2  9.71    29  1.80   66.0  46.5  78.3
## 3 Republican        Dem Favoured  63.2  9.89    30  1.81   63.2  45.3  78.1
## 4 Republican        Rep Favoured  55.0 10.5     29  1.95   56.8  38.2  73.5
#making table
accuracy_all_two.five_table <- rbind(accuracy_all_two.five_table, accuracy_all_two.five[1:2,-1])
accuracy_all_two.five_table$true_false <- c("Political_True", "Political_True", "Political_False", "Political_False")

accuracy_all_two.five %>%
  ggplot(aes(x = Par_Combined, y = mean, fill = as.factor(political_leaning))) + 
  geom_bar(stat = 'identity', position = 'dodge') + geom_errorbar(aes(ymin = mean-se, ymax =mean + se), width = .2, position = position_dodge(.9)) + theme_apa(legend.use.title = TRUE) + labs(title ="Accuracy across Dem and Rep favoured items", x = "Item Political Leaning", y = "Percent Accuracy", fill = "Pps Political Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

all items, familiarity thershold < 2.4 (political_false only)

# limited to 2.4
c_df_political_false %>% filter(measurement == "Fam" , value < 2.4) %>%
  ggplot() + geom_bar(aes(x = `Image Name`, y = value, fill = Par_Combined), stat = 'identity', position = 'dodge') + theme_apa(legend.use.title = TRUE) + theme(axis.text.x = element_text(angle = 45, hjust = 1, size = 5)) + labs(title = "All items, familiarity < 2.4", x = "Image Name", y = "Familiarity", fill = "Item Pol. Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

# need to find item numbers of those with Fam < 2.4 (across both dem and rep averaged)
# collapse across dem and rep - find average fam score, then exclude those that you don't need - make index from that.
accuracy_all_two.four <- c_df_political_false %>% group_by(`Item #`, `Image Name`, Par_Combined) %>% filter(measurement == "Fam") %>% summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))

accuracy_all_two.four <- accuracy_all_two.four %>% filter(mean < 2.4)
accuracy_all_two.four <- accuracy_all_two.four[[1]]
# accuracy_all_two.four
# length(accuracy_all_two.four)

#given the index, now subset based on the index numbers.
accuracy_all_two.four <- c_df_political_false %>% filter(measurement == "Acc_Abs", `Item #` %in% accuracy_all_two.four) %>% group_by(political_leaning, Par_Combined) %>%
  summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
accuracy_all_two.four
## # A tibble: 4 x 9
## # Groups:   political_leaning [2]
##   political_leaning Par_Combined  mean    SD count    se median   min   max
##   <chr>             <fct>        <dbl> <dbl> <int> <dbl>  <dbl> <dbl> <dbl>
## 1 Democrat          Dem Favoured  56.2  9.75    28  1.84   56.5  40.4  76.1
## 2 Democrat          Rep Favoured  64.2  9.71    29  1.80   66.0  46.5  78.3
## 3 Republican        Dem Favoured  63.5  9.88    28  1.87   63.2  45.3  78.1
## 4 Republican        Rep Favoured  55.0 10.5     29  1.95   56.8  38.2  73.5
#making table
accuracy_all_two.four_table <- rbind(accuracy_all_two.four_table, accuracy_all_two.four[1:2,-1])
accuracy_all_two.four_table$true_false <- c("Political_True", "Political_True", "Political_False", "Political_False")

accuracy_all_two.four %>%
  ggplot(aes(x = Par_Combined, y = mean, fill = as.factor(political_leaning))) + 
  geom_bar(stat = 'identity', position = 'dodge') + geom_errorbar(aes(ymin = mean-se, ymax =mean + se), width = .2, position = position_dodge(.9)) + theme_apa(legend.use.title = TRUE) + labs(title ="Accuracy across Dem and Rep favoured items", x = "Item Political Leaning", y = "Percent Accuracy", fill = "Pps Political Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

all items, familiarity thershold < 2.3 (political_false only)

# limited to 2.3
c_df_political_false %>% filter(measurement == "Fam", value < 2.3) %>%
  ggplot() + geom_bar(aes(x = `Image Name`, y = value, fill = Par_Combined), stat = 'identity', position = 'dodge') + theme_apa(legend.use.title = TRUE) + theme(axis.text.x = element_text(angle = 45, hjust = 1, size = 6)) + labs(title = "All items, familiarity < 2.3", x = "Image Name", y = "Familiarity", fill = "Item Pol. Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

# need to find item numbers of those with Fam < 2.3 (across both dem and rep averaged)
# collapse across dem and rep - find average fam score, then exclude those that you don't need - make index from that.
accuracy_all_two.three <- c_df_political_false %>% group_by(`Item #`, `Image Name`, Par_Combined) %>% filter(measurement == "Fam") %>% summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))

accuracy_all_two.three <- accuracy_all_two.three %>% filter(mean < 2.3)
accuracy_all_two.three <- accuracy_all_two.three[[1]]
# accuracy_all_two.three
# length(accuracy_all_two.three)

#given the index, now subset based on the index numbers.
accuracy_all_two.three <- c_df_political_false %>% filter(measurement == "Acc_Abs", `Item #` %in% accuracy_all_two.three) %>% group_by(political_leaning, Par_Combined) %>%
  summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
accuracy_all_two.three
## # A tibble: 4 x 9
## # Groups:   political_leaning [2]
##   political_leaning Par_Combined  mean    SD count    se median   min   max
##   <chr>             <fct>        <dbl> <dbl> <int> <dbl>  <dbl> <dbl> <dbl>
## 1 Democrat          Dem Favoured  57.5  9.53    25  1.91   58.5  40.4  76.1
## 2 Democrat          Rep Favoured  64.3  9.88    28  1.87   66.4  46.5  78.3
## 3 Republican        Dem Favoured  65.0  9.15    25  1.83   67.6  46.3  78.1
## 4 Republican        Rep Favoured  55.5 10.3     28  1.95   57.0  38.2  73.5
#making table
accuracy_all_two.three_table <- rbind(accuracy_all_two.three_table, accuracy_all_two.three[1:2,-1])
accuracy_all_two.three_table$true_false <- c("Political_True", "Political_True", "Political_False", "Political_False")

accuracy_all_two.three %>%
  ggplot(aes(x = Par_Combined, y = mean, fill = as.factor(political_leaning))) + 
  geom_bar(stat = 'identity', position = 'dodge') + geom_errorbar(aes(ymin = mean-se, ymax =mean + se), width = .2, position = position_dodge(.9)) + theme_apa(legend.use.title = TRUE) + labs(title ="Accuracy across Dem and Rep favoured items", x = "Item Political Leaning", y = "Percent Accuracy", fill = "Pps Political Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

all items, familiarity thershold < 2.2 (political_false only)

# limited to 2.2
c_df_political_false %>% filter(measurement == "Fam", value < 2.2) %>%
  ggplot() + geom_bar(aes(x = `Image Name`, y = value, fill = Par_Combined), stat = 'identity', position = 'dodge') + theme_apa(legend.use.title = TRUE) + theme(axis.text.x = element_text(angle = 45, hjust = 1, size = 6)) + labs(title = "All items, familiarity < 2.2", x = "Image Name", y = "Familiarity", fill = "Item Pol. Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

# need to find item numbers of those with Fam < 2.2 (across both dem and rep averaged)
# collapse across dem and rep - find average fam score, then exclude those that you don't need - make index from that.
accuracy_all_two.two <- c_df_political_false %>% group_by(`Item #`, `Image Name`, Par_Combined) %>% filter(measurement == "Fam") %>% summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))

accuracy_all_two.two <- accuracy_all_two.two %>% filter(mean < 2.2)
accuracy_all_two.two <- accuracy_all_two.two[[1]]
# accuracy_all_two.two
# length(accuracy_all_two.two)

#given the index, now subset based on the index numbers.
accuracy_all_two.two <- c_df_political_false %>% filter(measurement == "Acc_Abs", `Item #` %in% accuracy_all_two.two) %>% group_by(political_leaning, Par_Combined) %>%
  summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
accuracy_all_two.two
## # A tibble: 4 x 9
## # Groups:   political_leaning [2]
##   political_leaning Par_Combined  mean    SD count    se median   min   max
##   <chr>             <fct>        <dbl> <dbl> <int> <dbl>  <dbl> <dbl> <dbl>
## 1 Democrat          Dem Favoured  57.3  9.91    23  2.07   58.5  40.4  76.1
## 2 Democrat          Rep Favoured  64.3 10.3     25  2.06   66.7  46.5  78.3
## 3 Republican        Dem Favoured  64.7  9.30    23  1.94   67.6  46.3  78.1
## 4 Republican        Rep Favoured  55.4 10.4     25  2.08   56.8  38.2  73.5
#making table
accuracy_all_two.two_table <- rbind(accuracy_all_two.two_table, accuracy_all_two.two[1:2,-1])
accuracy_all_two.two_table$true_false <- c("Political_True", "Political_True", "Political_False", "Political_False")

accuracy_all_two.two %>%
  ggplot(aes(x = Par_Combined, y = mean, fill = as.factor(political_leaning))) + 
  geom_bar(stat = 'identity', position = 'dodge') + geom_errorbar(aes(ymin = mean-se, ymax =mean + se), width = .2, position = position_dodge(.9)) + theme_apa(legend.use.title = TRUE) + labs(title ="Accuracy across Dem and Rep favoured items", x = "Item Political Leaning", y = "Percent Accuracy", fill = "Pps Political Leaning") + scale_fill_manual(values=c("#0021F5", "#EA3223"))

Tables of familiarity across True and False items

#fam < 3
accuracy_all_three_table
## # A tibble: 4 x 9
##   Par_Combined  mean    SD count    se median   min   max true_false     
##   <fct>        <dbl> <dbl> <int> <dbl>  <dbl> <dbl> <dbl> <chr>          
## 1 Dem Favoured  68.5  8.72    44  1.31   69.9  45.1  81.7 Political_True 
## 2 Rep Favoured  60.6 11.5     17  2.78   61.0  44.6  77.6 Political_True 
## 3 Dem Favoured  55.4  9.94    30  1.81   56.1  39.6  76.1 Political_False
## 4 Rep Favoured  64.2  9.71    29  1.80   66.0  46.5  78.3 Political_False
# accuracy_all_three_table$true_false <- factor(accuracy_all_three_table$true_false, levels = c("Political_True", "Political_False"))

# accuracy_all_three_table %>% ggplot() + geom_bar(aes(x = Par_Combined, y = count, fill = Par_Combined), stat = 'identity', position = 'dodge') + theme_apa(legend.use.title = TRUE) + labs(title = "Item Count, fam < 3", x = "Item Pol. Leaning", y = "Count", fill = "Item Pol. Leaning") + facet_wrap(~true_false) + scale_fill_manual(values=c("#0021F5", "#EA3223"))

#fam < 2.5
accuracy_all_two.five_table
## # A tibble: 4 x 9
##   Par_Combined  mean    SD count    se median   min   max true_false     
##   <fct>        <dbl> <dbl> <int> <dbl>  <dbl> <dbl> <dbl> <chr>          
## 1 Dem Favoured  66.4  8.89    30  1.62   68.8  45.1  81.7 Political_True 
## 2 Rep Favoured  56.9 11.1     11  3.34   58.7  44.6  77.6 Political_True 
## 3 Dem Favoured  55.4  9.94    30  1.81   56.1  39.6  76.1 Political_False
## 4 Rep Favoured  64.2  9.71    29  1.80   66.0  46.5  78.3 Political_False
#fam < 2.4
accuracy_all_two.four_table
## # A tibble: 4 x 9
##   Par_Combined  mean    SD count    se median   min   max true_false     
##   <fct>        <dbl> <dbl> <int> <dbl>  <dbl> <dbl> <dbl> <chr>          
## 1 Dem Favoured  64.2  8.33    24  1.70   66.7  45.1  78.6 Political_True 
## 2 Rep Favoured  55.3  9.37     8  3.31   53.3  46.2  69.8 Political_True 
## 3 Dem Favoured  56.2  9.75    28  1.84   56.5  40.4  76.1 Political_False
## 4 Rep Favoured  64.2  9.71    29  1.80   66.0  46.5  78.3 Political_False
#fam < 2.3
accuracy_all_two.three_table
## # A tibble: 4 x 9
##   Par_Combined  mean    SD count    se median   min   max true_false     
##   <fct>        <dbl> <dbl> <int> <dbl>  <dbl> <dbl> <dbl> <chr>          
## 1 Dem Favoured  65.0  8.51    20  1.90   68.2  45.1  78.6 Political_True 
## 2 Rep Favoured  55.7 11.2      5  5.03   48    46.9  69.8 Political_True 
## 3 Dem Favoured  57.5  9.53    25  1.91   58.5  40.4  76.1 Political_False
## 4 Rep Favoured  64.3  9.88    28  1.87   66.4  46.5  78.3 Political_False
#fam < 2.2
accuracy_all_two.two_table
## # A tibble: 4 x 9
##   Par_Combined  mean    SD count    se median   min   max true_false     
##   <fct>        <dbl> <dbl> <int> <dbl>  <dbl> <dbl> <dbl> <chr>          
## 1 Dem Favoured  65.2 10.2     12  2.93   69.5  45.1  78.6 Political_True 
## 2 Rep Favoured  57.7 11.9      4  5.97   57.1  46.9  69.8 Political_True 
## 3 Dem Favoured  57.3  9.91    23  2.07   58.5  40.4  76.1 Political_False
## 4 Rep Favoured  64.3 10.3     25  2.06   66.7  46.5  78.3 Political_False
#  final selection
# View(c_df_political_true %>% filter(measurement == "Fam", Par_Combined == "Dem Favoured", political_leaning == "Democrat"))

tmp <- c_df_political_true %>% filter(measurement == "Fam", Par_Combined == "Dem Favoured", political_leaning == "Democrat")

tmp <- rbind(tmp, c_df_political_true %>% filter(measurement == "Fam", Par_Combined == "Rep Favoured", political_leaning == "Democrat"))

tmp <- rbind(tmp, c_df_political_false %>% filter(measurement == "Fam", Par_Combined == "Dem Favoured", political_leaning == "Democrat"))

tmp <- rbind(tmp, c_df_political_false %>% filter(measurement == "Fam", Par_Combined == "Rep Favoured", political_leaning == "Democrat"))

write_xlsx(
  tmp,
  path = "item_selection - review.xlsx",
  col_names = TRUE)

Partisian

# removing unnecessary columns
df_slim_leaning <- df[, c("Item #", "Category", "Image Name", "Headline Summary", "Par_Dem", "Par_Rep", "Par_Combined")]

#add whether the items are democratic favoured or republican favoured
df_slim_leaning$Par_Combined_Categ <- ifelse(df_slim_leaning$Par_Combined > 3.5, "Rep Favoured", "Dem Favoured")

# long format
df_slim_leaning_long <- gather(df_slim_leaning, key = "measurement", value = "value", -c("Item #", "Category", "Image Name", "Headline Summary", "Par_Combined_Categ"))

# adding political variable
df_slim_leaning_long$political_leaning <- "Democrat"

df_slim_leaning_long$political_leaning <- ifelse(str_detect(df_slim_leaning_long$measurement, "Rep") == TRUE, df_slim_leaning_long$political_leaning <- "Republican", df_slim_leaning_long$political_leaning <- "Democrat")

df_slim_leaning_long$political_leaning[str_detect(df_slim_leaning_long$measurement, "Combined")] <- "Combined"
df_slim_leaning_long$Par_Combined_Categ[str_detect(df_slim_leaning_long$measurement, "Combined")] <- "Combined"

df_slim_leaning_long$measurement <- str_replace(df_slim_leaning_long$measurement, c("_Rep"), "")
df_slim_leaning_long$measurement <- str_replace(df_slim_leaning_long$measurement, c("_Dem"), "")
df_slim_leaning_long$measurement <- str_replace(df_slim_leaning_long$measurement, c("_Combined"), "")

#adding classesf
df_slim_leaning_long$Par_Combined_Categ <- factor(df_slim_leaning_long$Par_Combined_Categ, levels = c("Dem Favoured", "Rep Favoured", "Combined"))

df_slim_leaning_long <- df_slim_leaning_long %>% filter(Category == "Political_True" | Category == "Political_Fake")

# removing those high or low in accuracy 
# after identifying which items to remove now creating new corrected dfs
df_slim_leaning_long <- df_slim_leaning_long %>% filter(`Item #` %notin% index_remove_all)
df_slim_leaning_long %>% group_by(Category, political_leaning) %>%
  summarise(mean = mean(value), SD = sd(value), count = n(), se = (SD/(sqrt(count))), median = median(value), min = min(value), max = max(value))
## # A tibble: 6 x 9
## # Groups:   Category [2]
##   Category     political_leani…  mean    SD count     se median   min   max
##   <chr>        <chr>            <dbl> <dbl> <int>  <dbl>  <dbl> <dbl> <dbl>
## 1 Political_F… Combined          3.44 0.565    59 0.0736   3.34  2.26  4.50
## 2 Political_F… Democrat          3.25 0.549    59 0.0715   3.24  2.12  4.3 
## 3 Political_F… Republican        3.63 0.627    59 0.0816   3.6   2.19  4.82
## 4 Political_T… Combined          3.23 0.529    64 0.0661   3.16  2.31  4.50
## 5 Political_T… Democrat          2.99 0.527    64 0.0658   2.90  2.07  4.07
## 6 Political_T… Republican        3.47 0.613    64 0.0766   3.38  2.17  5.15
# Basic histogram partisanship combined
df_slim_leaning_long %>% filter(political_leaning == "Combined") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Partisanship - Combined", x = "Likert Values", y = "Count",  subtitle = "If accurate, how favorable to Democrats vs. Republicans (>= 4: Rep)") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") + ylim(0,12.5)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram partisanship combined facet
df_slim_leaning_long %>% filter(political_leaning == "Combined") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Partisanship - Combined", x = "Likert Values", y = "Count",  subtitle = "If accurate, how favorable to Democrats vs. Republicans (>= 4: Rep)") + facet_wrap(~Category) + ylim(0,12.5)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram partisanship dems only
df_slim_leaning_long %>% filter(political_leaning == "Democrat") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Partisanship - Democrats Only", x = "Likert Values", y = "Count",  subtitle = "If accurate, how favorable to Democrats vs. Republicans (>= 4: Rep)") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") + ylim(0,12.5)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram partisanship dems only facet
df_slim_leaning_long %>% filter(political_leaning == "Democrat") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Partisanship - Democrats Only", x = "Likert Values", y = "Count",  subtitle = "If accurate, how favorable to Democrats vs. Republicans (>= 4: Rep)") + facet_wrap(~Category) + ylim(0,12.5)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram partisanship reps
df_slim_leaning_long %>% filter(political_leaning == "Republican") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Partisanship - Republicans Only", x = "Likert Values", y = "Count",  subtitle = "If accurate, how favorable to Democrats vs. Republicans (>= 4: Rep)") + geom_vline(aes(xintercept = mean(value)), linetype="dashed") + ylim(0,12.5)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram partisanship reps facet
df_slim_leaning_long %>% filter(political_leaning == "Republican") %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Partisanship - Republicans Only", x = "Likert Values", y = "Count",  subtitle = "If accurate, how favorable to Democrats vs. Republicans (>= 4: Rep)") + facet_wrap(~Category) + ylim(0,12.5)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

# Basic histogram all partisanship factors
df_slim_leaning_long %>% ggplot(aes(x=value)) + geom_histogram() + theme_apa() + labs(title = "Partisanship - All factors", x = "Likert Values", y = "Count",  subtitle = "If accurate, how favorable to Democrats vs. Republicans (>= 4: Rep)") + facet_wrap(~political_leaning)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.